﻿<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema"
                xmlns:d="http://schemas.microsoft.com/sharepoint/dsp"
                version="1.0"
                exclude-result-prefixes="xsl msxsl ddwrt"
                xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
                xmlns:asp="http://schemas.microsoft.com/ASPNET/20"
                xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:msxsl="urn:schemas-microsoft-com:xslt"
                xmlns:SharePoint="Microsoft.SharePoint.WebControls"
                xmlns:ddwrt2="urn:frontpage:internal">
  <xsl:template match="FieldRef[@FieldType = 'BengenRecurrenceField']"
                mode="Text_body">
    <xsl:param name="thisNode"
               select="." />
    <xsl:variable name="value">
      <xsl:value-of select="$thisNode/@*[name()=current()/@Name]" />
    </xsl:variable>
    <xsl:variable name="one"
                  select="substring-after($value,';#')"/>
    <xsl:variable name="two"
                  select="substring-after($one,';#')"/>
    <xsl:variable name="three"
                  select="substring-after($two,';#')"/>
    <xsl:variable name="four"
                  select="substring-after($three,';#')"/>
    <xsl:variable name="five"
                  select="substring-after($four,';#')"/>
    <xsl:variable name="six"
                  select="substring-after($five,';#')"/>
    <xsl:variable name="seven"
                  select="substring-after($six,';#')"/>
    <xsl:variable name="eight"
                  select="substring-after($seven,';#')"/>

    <xsl:value-of select="substring-before($eight,';#')"/>
  </xsl:template >
</xsl:stylesheet>